home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / cpkocx17 / readme.txt < prev    next >
Encoding:
Text File  |  1998-09-17  |  21.6 KB  |  594 lines

  1.  
  2.                  ========================
  3.                  CARDPACK ActiveX Control
  4.                       Release v1.7
  5.                        README.TXT
  6.                  ========================
  7.  
  8.  
  9.  
  10. Abstract
  11. --------
  12.  
  13. This package contains the CardPack ActiveX control.
  14.  
  15. This small software component implements a stack of playing cards,
  16. giving programmers a powerful object to build card games with.
  17. It can be used from Visual Basic, Visual C++ and even on web pages!
  18.  
  19. The most relevant features of this control are:
  20.  
  21. - It comes as an ActiveX control in 16 and 32-bit format. An
  22.   earlier version (1.1) is still available as a VBX for use in
  23.   Visual Basic 3.
  24.  
  25. - It can use the card picture library taken from old SOL.EXE or
  26.   CARDS.DLL, which are provided in different versions of MS-Windows,
  27.   The control is thus very small. If you prefer, you can provide your
  28.   own card picture library with no color limitations!.
  29.  
  30. - It handles (as the name implies) stack with a virtually unlimited
  31.   number of cards. Cards can be stacked or spread out in a number of ways.
  32.  
  33. - It has a wide set of game-oriented properties, designed to make it
  34.   very easy to implement card games with no hassle. These include
  35.   pattern-based queries and selections in the stack, handy extraction
  36.   and addition methods, shuffling, sorting, and more!
  37.  
  38. - Comes with extensive documentation, programming tutorial, reference
  39.   information and samples for Visual Basic and Internet Explorer!
  40.  
  41. More complete documentation is contained in the help file you will
  42. find in this archive (cardpack.hlp).
  43.  
  44.  
  45. Getting the files
  46. -----------------
  47.  
  48. You can always get the latest release of this software from the
  49. official Cardpack home page on the Web:
  50.  
  51.   http://www.multimedia.it/andy/cardpack/
  52.  
  53. You can also contact the author by E-mail at the following address:
  54.  
  55.   zanna@multimedia.it
  56.  
  57.   
  58.  
  59. More Information
  60. ----------------
  61.  
  62. The CardPack custom control began its life as a spare time
  63. self-training project on custom controls and Windows programming.
  64. Day after day, feature after feature, the control became a nice
  65. piece of software, and it was really a shame to let it gather dust
  66. in a drawer.
  67.  
  68. This piece of software was never actually intended for commercial
  69. use. However, just in case, there is a license mechanism built in
  70. that should convince you to check with the author before you attempt
  71. to make money out of this software. Please read the following
  72. sections for details.
  73.  
  74. I sincerely hope that you have as much fun using this software
  75. as I had writing it.
  76.  
  77.  
  78. What's new in release 1.7
  79. -------------------------
  80.  
  81.   From this release on, only a 32-bit ActiveX version of the control
  82.   is provided. Only Visual Basic 5 or higher is supported. 
  83.  
  84.   Removed fixed limit on number of cards in a control. The value
  85.   of NumCards is now only limited by system memory.
  86.  
  87.   Added support for 256-colour cards on displays with a palette.
  88.   The control now looks for a palette in the test card it opens
  89.   from the DLL (resource #53, the first back) and uses it for all
  90.   cards rendering.
  91.  
  92.   Fixed a bug where setting a control .Cards property to an empty
  93.   card set could leave the control with 1 card.
  94.  
  95.  
  96. Previous Release History
  97. ------------------------
  98.  
  99. * Version 1.6
  100.  
  101.   Migrated 32-bit development environment to VC++ 5 (requires new
  102.   run-time libraries)
  103.  
  104.   The NumCards property can now be set to any number and it will
  105.   not be rounded to a multiple of 4. This is useful at design time
  106.   to get a better feel for your layout design.
  107.  
  108.   Added a new method, DrawCard, which can be used to perform
  109.   completely custom layouts or animation effects, as shown in the
  110.   about box of the sample game included in the archive, Briscola. 
  111.  
  112.   The Shuffle method was extended to take a seed parameter. This allows
  113.   you to generate predictable random shuffling sequences, so that you
  114.   can reproduce situations and test your game strategies.
  115.  
  116.   Fixed a bug where registering the control with Windows 95 at set-up
  117.   could crash on some systems.
  118.  
  119.   Fixed a bug where, on fast computers, shuffling cards was not working
  120.   very well.
  121.  
  122.  
  123. * Version 1.5
  124.  
  125.   The control now supports 2 different jokers, as values 14 and 15. They
  126.   map to card pictures in the library with resources id # 70 and 71, if
  127.   available, or 70, or fall back to resource 56 if none of those are
  128.   found.
  129.  
  130.   Now both CARDS16 and CARD32.DLLs have 2 jokers cards (red and blue),
  131.   as resources 70 and 71, to match the new capabilities in the control.
  132.  
  133.   Fixed a bug where the CARDS16.DLL released in the previous version was
  134.   broken and could not load the joker.
  135.  
  136.   Fixed a bug where jokers were always added face-down rather than
  137.   respecting the default stack facing.
  138.  
  139.   Fixed a bug where moving jokers across controls caused an invalid
  140.   property value error. The control was checking that the card had a
  141.   valid suit, a rule which should not apply to jokers.
  142.  
  143.   Added 2 new properties to extract the top and bottom sections of a card
  144.   deck without having to loop over each card: TopCards and BottomCards
  145.  
  146.   Added a 'CurrentCard' property that removes and returns the card
  147.   currently under the cursor.
  148.  
  149. * Version 1.4
  150.  
  151.   A patch for making the control work with Visual Basic 5 has been
  152.   incorporated (formerly released as version 1.3 build 002).
  153.   The control was crashing VB5 due to some subtle environmental
  154.   differences with respect to VB4 and other ActiveX containers.
  155.  
  156.   The control code was slightly optimized. Some dead code has been
  157.   removed.
  158.  
  159.   Fixed a bug where controls with AutoSize=False would not properly
  160.   reload their size.
  161.  
  162.   Fixed a bug where controls with AutoSize=False were not recalculating
  163.   their layout correctly at design time.
  164.  
  165.   Fixed a bug where the control was not respecting custom card sizes
  166.   when reloading properties.
  167.  
  168.   The control now prevents recursion of the Change() event. You can now
  169.   safely add and remove cards within the event without bothering about
  170.   implementing a semaphore variable in Visual Basic code.
  171.  
  172.   The CardsLibrary property now always shows the name of currently
  173.   loaded DLL, even when it is one of the system DLL that are
  174.   automatically sought by the control. The DLL name now always gets
  175.   serialized when a project is saved.
  176.  
  177.   If loading the specified cards DLL fails, the control now attempts all
  178.   the default names, as if no specific DLL had been indicated. This is a
  179.   workaround against possible problems where loading the project or
  180.   program on a different system, failing because a differently named
  181.   cards DLL is present.
  182.  
  183. * Version 1.3
  184.  
  185.   The 32 bit OCX version of the control could always be used in Web
  186.   pages. However, previous versions had a bug where checking a
  187.   server-side control license from Microsoft Internet Explorer failed.
  188.   This is now fixed.
  189.  
  190.   The control is not signed yet, so Internet Explorer will warn you
  191.   against it for security reasons, but it works very well on the Web.
  192.  
  193.   Also, a tutorial about using the CardPack control on Web Pages was
  194.   added to the documentation for all you Internet programmers and some
  195.   web-based demos have been added to the distribution package.
  196.  
  197.   A little bug was fixed that could cause the control to fail loading
  198.   the Joker card.
  199.  
  200.   Finally, we have included an automatic setup for Windows 95,
  201.   NT 4 or better, as well as provisions to uninstall the software.
  202.  
  203.  
  204. * Version 1.2
  205.  
  206.   There is a new property, "CardsLibrary", that allows you to
  207.   explicitely specify the cards DLL to be used to provide the
  208.   pictures for a specific control instance. It is thus possible
  209.   to freely specify custom cards picture libraries.
  210.  
  211.   A 16-bit sample custom card DLL (acards.dll) is provided to
  212.   test this feature with the 16-bit version of the control.
  213.  
  214. * ActiveX Version 1.1
  215.  
  216.   Two OLE control (OCX) versions of the control are now provided:
  217.   a 16-bit version, CARDPK16.OCX and a 32-bit version, CARDPK32.OCX,
  218.   with equivalent functionality. Since this release, all new control
  219.   release are in the ActiveX (OCX) format.
  220.  
  221.   A couple of nasty layout bugs apparent when the stack was shown in
  222.   "slanted" mode have been evicted.
  223.  
  224.   Note that the binary format for card-set strings has changed and is
  225.   now different between CARDPK16.OCX and CARDPK32.OCX. Sorry, but this
  226.   has to do with the way 32-bit OLE works. This has an inpact on load
  227.   and save code in your application. See the help file for details.
  228.  
  229.   The 32-bit version of the control will require a 32-bit version
  230.   of CARDS.DLL. Such version is directly available on NT systems, but
  231.   not on Windows 95. When ported to Windows 95, the DLL should be
  232.   renamed CARDS32.DLL.
  233.  
  234. * OCX Version 1.0
  235.  
  236.   One 16-bit OLE control (OCX) is provided: CARDPK16.OCX
  237.   For the time being the 32-bit version (CARDPK32.OCX) is not ready.
  238.  
  239.   Using Visual Basic 4, it is possible to automatically migrate existing
  240.   code that used the VBX version of the control to the new standard.
  241.  
  242.   The control supports new Methods, a better alternative to the old
  243.   Action property of the VBX version of the control. Some of the methods
  244.   also support optional parameters. 
  245.  
  246.   A new action/method (Reset) is provided.
  247.  
  248.   The control allows the use of a custom graphic as mouse pointer, using
  249.   the new property MouseIcon.
  250.  
  251.   All properties for accessing the components of a Card Descriptor are
  252.   range-checked on setting. An error is raised when an illegal value is
  253.   used.
  254.  
  255. * VBX Version 1.1
  256.  
  257.   Fixed bug where adding a card to a position other than Top or
  258.   Bottom of the stack with AddCard was broken.
  259.  
  260.   Fixed bug where adding a card to a stack caused 2 redraws,
  261.   not 1 when AutoSize was set to True.
  262.  
  263.   Some optimization of control repaint has been implemented,
  264.   in case just one card is inserted or removed. In particular,
  265.   removing a card does not repaint the whole control unless
  266.   AutoSize =True and PackOnRemove=True; adding one card does
  267.   not repaint the whole control unless AutoSize =True.
  268.  
  269.   Because of some code optimization, the exception caused when
  270.   reading SelectedCard the last time has changed from overflow to
  271.   invalid property index.
  272.  
  273.   The sample program (Briscola) is now provided in two versions:
  274.   one for Visual Basic 3.0 (Folder Briscola.vb3) and one for
  275.   Visual Basic 4.0/16-bit (Folder Briscola.vb4).
  276.  
  277. * VBX Version 1.0
  278.  
  279.   Initial release
  280.  
  281.  
  282. Contents of the Archive
  283. -----------------------
  284.  
  285. The distribution archive should contain the following files:
  286.  
  287.   Main directory
  288.     README.TXT   - This file
  289.     CARDPACK.HLP - Control help file
  290.     SETUP.EXE    - Program for automatic installation
  291.     CARDPACK.INF - Installation script for SETUP.EXE
  292.  
  293.   BRISCOLA Directory 
  294.     Sample Visual Basic card game.
  295.  
  296.   CARDSDLL Directory
  297.     Sample custom-card DLL and Visual Basic project using it.
  298.  
  299.   CONTROLS Directory 
  300.     Cardpack controls,
  301.     Visual Basic programming support file.
  302.  
  303.   WEBGAME Directory
  304.     A solitaire game implemented on a Web page in VBScript.
  305.  
  306.   WEBTEST Directory
  307.     A simple demo showing how to embed the control in a Web page. 
  308.  
  309.  
  310. Installation
  311. ------------
  312.  
  313. Preliminary Notes:
  314.  
  315. The Cardpack control is a custom control suitable for use with 
  316. versions of Visual Basic supporting OCXs (4.0 or better). The
  317. 16-bit version of the control (CARDPK16.OCX) will only work with
  318. Visual Basic 4.0/16-bit, while the 32-bit version (CARDPK32.OCX)
  319. should work with all 32-bit versions of Visual Basic.
  320.  
  321. In order to keep the file size down, this archive does not contain
  322. the shared Microsoft DLL that are needed to run this control:
  323.  
  324.     MFC42.DLL, MSVCRT.DLL    (32-bit version)
  325.     OC25.DLL        (16-bit version)
  326.  
  327. You probably already have these DLLs on your system, but just in
  328. case, they are available for download at:
  329.  
  330.       http://www.multimedia.it/andy/logbook/download
  331.  
  332. or from in most on-line software archives.
  333.  
  334. The Cardpack controls contained in the distribution archive are
  335. fully functional. However, you will require a license file in
  336. order to get rid of the warning dialog both at programming time
  337. and in executables.
  338.  
  339. To automatically install the software under NT 4, Windows 95:
  340.  
  341. 1. If you are running Windows 95, NT 4 or anything better, you
  342.    can install the software by double clicking on the SETUP.EXE
  343.    program from the Windows Explorer. This will install the controls,
  344.    help file and sample applications on your system.
  345.  
  346. 2. Check out the Manual Installation Procedure detailed below anyway.
  347.    Point 3 explains how to install the license file that you may
  348.    receive separately. Point 5 explains how you can use Visual Basic
  349.    to check that the controls are properly registered 
  350.  
  351. 3. Check the important notes on CARDS.DLL further down in this file.
  352.  
  353. To uninstall the package use the Windows Control Panel, "software"
  354. applet. In the list you find on the Add/Remove Software page, double
  355. click the entry named "Cardpack Control".
  356.  
  357.  
  358. To install the controls MANUALLY:
  359.  
  360. The distribution archive should include the following files:
  361.  
  362.  CARDPK32.OCX    the custom control file - 32-bit version
  363.  CARDPK16.OCX    the custom control file - 16-bit version
  364.  CARDPACK.HLP    the help file
  365.  CARDPACK.BAS    support file for program development
  366.  
  367. Additionally, when you register you shall receive the license file,
  368. CARDPACK.LIC via E-mail.
  369.  
  370. 1. Copy the selected control file(s) and in the System directory: 
  371.    In Windows 3.x, Windows 95 and Windows 98, typically
  372.    C:\WINDOWS\SYSTEM
  373.    In Windows NT, 16-bit controls in C:\WINNT\SYSTEM, while
  374.    32-bit controls in C:\WINNT\SYSTEM32.
  375.  
  376. 2. Copy CARDPACK.HLP in C:\WINDOWS\HELP, C:\WINNT\HELP or in
  377.    the same directory where you put the control files.
  378.  
  379. 3. The license file should be placed in the \Windows directory.
  380.    Of course, you should not  distribute the license file with
  381.    executable programs you write.
  382.  
  383. 4. If you are a Visual Basic programmer, the CARDPACK.BAS file
  384.    can be placed in your program source code directory and added
  385.    to your VB project.
  386.  
  387. 5. Register the control from Visual Basic. In Visual Basic 4,
  388.    select the Tools menu, Custom Controls. Click the BROWSE
  389.    button. Go to the directory where the control is installed,
  390.    then check it. Close the Controls window clicking OK. In
  391.    Visual Basic 5, use the Project, Components menu item.
  392.  
  393. 6. For automatic conversion of Visual Basic programs from VBX
  394.    to the OCX version of the control, edit VB.INI (normally in
  395.     c:\WINDOWS); locate the section named [VBX Conversions16] and
  396.     add the following line:
  397.  
  398. cardpack.vbx={6B17E7E3-AECA-11D0-B4D8-444553540000}#1.0#0;C:\Windows\System\cardpk16.ocx
  399.  
  400.     You can do the same for the 32-bit version of the control.
  401.     The VB.INI section to edit is [VBX Conversions32] and the
  402.     line to add is:
  403.  
  404. cardpack.vbx={6B17E7E3-AECA-11D0-B4D8-444553540000}#1.0#0;C:\Windows\System\cardpk32.ocx
  405.  
  406.  
  407. CARDS.DLL, Important Notes
  408. --------------------------
  409.  
  410. This control can use the card bitmaps it finds in SOL.EXE or CARDS.DLL.
  411.  
  412. These are components of the Solitaire and other card games which are provided
  413. in different versions of MS-Windows and in the Windows Entertainment Packs.
  414.  
  415. Since these are Microsoft products, we cannot distribute them with the control.
  416. So, first of all, make sure you have installed the card games that came with
  417. your system. 
  418.  
  419. Unfortunately, 16-bit versions of the control require a 16-bit version of
  420. CARDS.DLL, while 32-bit versions of the control require a 32-bit version
  421. of CARDS.DLL.
  422.  
  423. You need to be aware of this, because with some set-ups you may be missing an
  424. appropriate version of the library on the system. If the control complains
  425. about being unable to find a cards library and you DO have one on the system,
  426. it may simply be the wrong version.
  427.  
  428. Apparently most Windows95 installations only come with 16-bit versions of card
  429. games and CARDS.DLL (exactly like Windows 3.1). These will work fine with either
  430. the VBX version or with the 16-bit OCX version of the control, but not with
  431. 32-bit versions of the OCX control. Viceversa, the version of CARDS.DLL
  432. installed in the System32 directory on Windows NT systems is a true 32-bit DLL
  433. and can be used with the 32-bit OCX version, but not with either of the 16-bit
  434. versions.
  435.  
  436. To sum things up:
  437.  
  438.            | Windows 3.1 |     Windows 95      |     Windows NT
  439. -----------|-------------|---------------------|---------------------
  440. 16-Bit VBX |    OK       |        OK           | Needs 16-Bit DLL (1)
  441. 16-Bit OCX |    OK       |        OK           | Needs 16-Bit DLL (1)
  442. 32-Bit OCX |    NO       | Needs 32-Bit DLL(2) |         OK
  443.  
  444. (1) 16-bit versions of the control on Windows NT require you to get a copy of
  445.     a 16-bit CARDS.DLL from a Windows 3.1 or Window95 system and copy it to
  446.     the C:\WINNT\SYSTEM directory on the NT machine.
  447.  
  448. (2) 32-bit versions of the control on Windows 95 require you to get a copy of
  449.     a 32-bit CARDS.DLL from the C:\WINNT\SYSTEM32 directory on an NT computer
  450.     and copy it on your W95 computer in C:\WINDOWS\SYTEM as CARDS32.DLL
  451.  
  452. OK, so you are missing the right DLL and cannot get it? No problem.
  453. There are a CARDS32.DLL and a CARDS16.DLL for you to use with the
  454. control in the CARDSDLL Sample. Note that these sample DLLs do not
  455. provide the code needed by Solitaire and other standard Window games.
  456. They will only work with the Cardpack control, so make sure you don't
  457. overwrite one of the original CARDS.DLL you have on your system.
  458.  
  459. Please note that, in case (2) above, changing the name of the library
  460. is necessary in order to avoid deleting the existing 16-bit CARDS.DLL
  461. which may reside in the same directory. 
  462.  
  463. Finally, the 32-bit version of the control has not been tested on Win32s
  464. systems. It is not currently known if it will behave properly on such machines.
  465.  
  466.  
  467. Copyright Notices
  468. -----------------
  469.  
  470. The CardPack Control is Copyright ⌐ 1995-1998 by Andy Zanna.
  471. All rights reserved.
  472.  
  473. Windows, Windows NT, Windows 95, Visual Basic, Excel, Access,
  474. Office, Visual Basic for Applications, VBScript, Windows
  475. Entertainment Packs, Visual C++, Front Page, ActiveX and
  476. Internet Explorer are either trademarks or registered trademarks
  477. of Microsoft Corporation.
  478.  
  479. Disclaimer
  480. ----------
  481.  
  482. THIS SOFTWARE AND THE ACCOMPANYING FILES ARE PROVIDED "AS IS" AND
  483. WITHOUT WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY
  484. OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED. IN NO EVENT SHALL
  485. THE AUTHOR BE LIABLE FOR ANY DAMAGES, INCLUDING ANY LOSS OF PROFITS,
  486. LOSS OF DATA, INCLUDING BUT NOT LIMITED TO SPECIAL, INCIDENTAL,
  487. CONSEQUENTIAL, OR INDIRECT DAMAGES ARISING FROM THE USE OF THIS
  488. SOFTWARE.
  489.  
  490.  
  491. Distribution
  492. ------------
  493.  
  494. The distribution package for this version of the CardPack software
  495. must at least include the following files:
  496.  
  497.  CARDPK32.OCX
  498.  CARDPK16.OCX
  499.  CARDPACK.HLP
  500.  CARDPACK.BAS
  501.  README.TXT
  502.  
  503. This package can be freely distributed provided that:
  504.  
  505. 1.  It is not bundled with a commercial product.
  506.  
  507. 2.  All the files in the package are included and no changes of
  508.     any kind are made to the original files.
  509.  
  510. 3.  No charge or donation is requested for any copy of
  511.     the software itself, however made, except for the bare
  512.     cost of physical support, transmission medium and time
  513.     required to perform the copy.
  514.  
  515. In all other circumstances, written permission must be obtained
  516. from the author prior to distribution.
  517.  
  518. The custom control files (CARDPK16.OCX and CARDPK32.OCX) can be
  519. distributed alone only as part of a commercial product and only
  520. if the author of that product has a valid license for the CardPack
  521. software.
  522.  
  523. This license cannot be transferred to users or purchasers of the
  524. said commercial product.
  525.  
  526.  
  527. User License
  528. ------------
  529.  
  530. This package can be freely used for any legitimate personal,
  531. non-commercial purpose.
  532.  
  533. When used as component of a commercial  program, the producer
  534. is required to contact the CardPack author in order to obtain
  535. permission, in the form of a specific development license file
  536. (see Registration Information below).
  537.  
  538. The author reserves all right to change the distribution and
  539. licensing policy for any future major version of the CardPack
  540. software and derived products.
  541.  
  542. Source code for this package is not freely available. It can,
  543. however, be purchased from the author.
  544.  
  545.  
  546. About the Author
  547. ----------------
  548.  
  549. The author (Andy Zanna) is an electronic engineer with a broad
  550. experience in software design and production on a wide range of
  551. systems, from home computers to real-time systems, enterprise
  552. servers and large networks.
  553.  
  554. This software is in no way related to the authorÆs real work or
  555. to the company where he is employed.
  556.  
  557. Registrations, information queries and suggestions should be
  558. addressed to:
  559.  
  560.   Andy Zanna
  561.   Hauptstr. 41
  562.   D-71263
  563.   Merklingen - Weil der Stadt
  564.   Germany
  565.   
  566.   phone:    +49-7033-33800
  567.   E-mail:    zanna@multimedia.it
  568.  
  569.  
  570. Registration Information
  571. ------------------------
  572.  
  573. If you register this control, you will receive a license file that
  574. will get rid of the warning dialog that is displayed when the control
  575. is loaded at design or run-time. You will then be able to compile
  576. stand-alone applications and distribute them free of royalty.
  577.  
  578. You will also receive notifications of updates and a right to use
  579. all minor updates (e.g. 1.x) with the same license.
  580.  
  581. The registration fee is US$ 25 or equivalent in major currencies
  582. (DM, UK Pound, F Franks), should be sent by mail money order to
  583. the address above. You should add another 5$ if you require that
  584. the software and the license be sent to you via ordinary mail,
  585. rather than E-mail.
  586.  
  587. You should also send a registration notice by ordinary mail or
  588. E-mail (preferably) to the address above, indicating your name,
  589. company (if applicable), mail and E-mail addresses.
  590.  
  591.                      * end of file *
  592.  
  593.  
  594.